package com.ttg.common.enums;

import lombok.Getter;

/**
 * Description： 比较符号枚举
 * Author: chenyou
 * Date: 2025/8/27 16:31
 * Company: ttg
 * Copyright: Copyright (c) 2025
 */
@Getter
public enum SymbolEnum {
    大于("gt","大于"),

    大于等于("ge","大于等于"),

    等于("eq","等于"),

    小于等于("le","小于等于"),

    小于("lt","小于"),

    不等于("ne","不等于"),
    ;

    SymbolEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;
    private String desc;

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }


    public static SymbolEnum getByVal(String value){
        for(SymbolEnum curr:SymbolEnum.values()){
            if(curr.value.equals(value)){
                return curr;
            }
        }
        return null;
    }
}
